
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录页面</title>

    <script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script>
    <script>
        //判断账号和登录密码是否为空
        function check()
        {
            var username=$("#usercode").val();
            var password=$("#password").val();
            if(username==""||password=="")
            {
                $("#message").text("账号或者密码不能为空");
                return false;
            }
            return true;
        }

    </script>
</head>
<body background="${pageContext.request.contextPath}/images/rights.jpg" >
<div style="width: 300px;margin-left: auto;margin-right: auto;text-align: center;">
    <h1 align="center" height="100px">欢迎使用</h1>
    <h2>
        <font align="center" color="red">
            <span id="message">${msg}</span>
        </font>
    </h2>

    <form align="center" action="${pageContext.request.contextPath}/login.do"
          method="post" onsubmit="return check()">
        <h3>
            账号：<input type="text" id="usercode" name="usercode" style="width: 200px;height: 25px"/><br>
        </h3>
        <h3>
            密码：<input type="text" id="password" name="password" style="width: 200px;height: 25px"/><br>

        </h3>
        <center><input type="submit" value="登陆" style="width: 100px;height: 30px;border-style: hidden;" /></center>
    </form>
    <input type="button" value="注册" onclick="window.location.href='${pageContext.request.contextPath}/regist.do'">


</div>


</body>
</html>
